Future Sales Prediction

Importing the libraries

Reading the dataset

Check if the dataset contains any null values

this dataset doesn’t have any null values. let’s visualize the relationship between the amount spent on advertising on TV and units sold:

Now visualising the relationship between the amount spent on advertising in newspaper and unit sold:

Visualising the relationship between amount spent on advertising on radio and unit sold:

Out of all the amounts spent on advertising, Advertising on TV results in more sales of products. Let's see the correlation of all the columns with sales column

Splitting the data into training and testing sets:

Now in this section, We will train a machine learning model to predict the future sales of a product.

let’s input values into the model according to the features we have used to train it and predict how many units of the product can be sold based on the amount spent on its advertising on various platforms: